﻿using Lazy.Captcha.Core;
using NewCodeAPI.IServices;
using NewCodeAPI.Models;
using Service;

namespace NewCodeAPI.Service
{
    public class UserService : IUserService
    {
        private readonly RegistrationService _registrationService;
        private readonly UserLoginService _userLoginService;

        public UserService(RegistrationService registrationService,UserLoginService userLoginService)
        {
            _registrationService = registrationService;
            _userLoginService = userLoginService;
        }
        public MsgInfo Register(string username, string password)
        {
            return _registrationService.RegisterUser(username, password);
        }
        public MsgInfo Login(string username, string password, string code)
        {
            return _userLoginService.LoginUser(username, password, code);
        }
    }
}
